package com.jbit.examSystem.pojo;

public class ResponseResult {
    private Boolean success;
    private String errorMsg;
    private Object data;

    public static ResponseResult success(Object data){
        ResponseResult result = new ResponseResult();
        result.success = true;
        result.data=data;
        return result;
    }

    public static ResponseResult error(String errorMsg){
        ResponseResult result = new ResponseResult();
        result.setErrorMsg(errorMsg);
        return result;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
